package com.seean.rsademo;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @authur wsx
 * @date 2019/9/2 15:04
 */
@Controller
public class TestController {
    /**
     * RSA测试
     *
     * @return object
     */
    @RequestMapping("/rsaTest")
    @ResponseBody
    @RsaSecurityParameter
    public User rsaTest(@RequestBody User user) {
        System.out.println(user.getName());
        return  user;
    }

    /**
     * 跳转rsa页面
     *
     * @return
     */

    @RequestMapping("/rsa")
    public String goRsa() {
        return "rsa";
    }
}
